import request from '@/utils/request'

// 查询公钥证书列表
export function listCertificateManagement(query) {
	return request({
		url: '/bus/codeManagementConfig/list',
		method: 'get',
		params: query
	})
}

// 公钥证书详情
export function getCertificateManagementDetail(id) {
	return request({
		url: '/bus/codeManagementConfig/' + id,
		method: 'get'
	})
}

// 添加发卡机构秘钥对和用户支付秘钥对
export function addCertificateManagementConfig(data) {
	return request({
		url: '/bus/codeManagementConfig/addSecret',
		method: 'post',
		data: data
	})
}

// 发卡机构公钥证书文件制作
export function createCardPubKeyCaRequestFile(data) {
	return request({
		url: '/bus/codeManagementConfig/createCardPubKeyCaRequestFile',
		method: 'post',
		data: data
	})
}

// 获取证书下拉数据
export function getCaList(data) {
	return request({
		url: '/bus/codeManagementConfig/getCaList',
		method: 'post',
		data: data
	})
}
